package org.example;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class SpringIoc {
    @Test
    public void getXMLBean(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        MoAttack moAttack = (MoAttack) context.getBean("moAttack");
        moAttack.cityGateAsk();
        MoAttack moAttack1 = (MoAttack) context.getBean("moAttack1");
        moAttack1.cityGateAsk();
    }
}
